'\" t
.\"     Title: yabai
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.23
.\"      Date: 2025-02-14
.\"    Manual: Yabai Manual
.\"    Source: Yabai
.\"  Language: English
.\"
.TH "YABAI" "1" "2025-02-14" "Yabai" "Yabai Manual"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
yabai \- window manager
.SH "SYNOPSIS"
.sp
\fByabai\fP [\fB\-\-load\-sa\fP|\fB\-\-uninstall\-sa\fP|\fB\-\-install\-service\fP|\fB\-\-uninstall\-service\fP|\fB\-\-start\-service\fP|\fB\-\-restart\-service\fP|\fB\-\-stop\-service\fP|\fB\-\-message\fP,\fB\-m\fP \fImsg\fP|\fB\-\-config\fP,\fB\-c\fP \fIconfig_file\fP|\fB\-\-verbose\fP,\fB\-V\fP|\fB\-\-version\fP,\fB\-v\fP|\fB\-\-help\fP,\fB\-h\fP]
.SH "DESCRIPTION"
.sp
\fByabai\fP is a tiling window manager for macOS based on binary space partitioning.
.SH "OPTIONS"
.sp
\fB\-\-load\-sa\fP
.RS 4
Load the scripting\-addition into Dock.app.
.br
Installs and updates the scripting\-addition when necessary.
.br
Path is /Library/ScriptingAdditions/yabai.osax.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-uninstall\-sa\fP
.RS 4
Uninstall the scripting\-addition. Must be run as root.
.br
Path is /Library/ScriptingAdditions/yabai.osax.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-install\-service\fP
.RS 4
Writes a launchd service file to disk.
.br
Path is ~/Library/LaunchAgents/com.koekeishiya.yabai.plist.
.RE
.sp
\fB\-\-uninstall\-service\fP
.RS 4
Removes a launchd service file from disk.
.br
Path is ~/Library/LaunchAgents/com.koekeishiya.yabai.plist.
.RE
.sp
\fB\-\-start\-service\fP
.RS 4
Enables, loads, and starts the launchd service.
.br
Will install service file if it does not exist.
.RE
.sp
\fB\-\-restart\-service\fP
.RS 4
Attempts to restart the service instance.
.RE
.sp
\fB\-\-stop\-service\fP
.RS 4
Stops a running instance of the service and unloads it.
.RE
.sp
\fB\-\-message\fP, \fB\-m\fP \fI<msg>\fP
.RS 4
Send message to a running instance of yabai.
.RE
.sp
\fB\-\-config\fP, \fB\-c\fP \fI<config_file>\fP
.RS 4
Use the specified configuration file.
.br
Executes using \f(CR/usr/bin/env sh \-c <config_file>\fP if the exec\-bit is set.
.br
Interpreted using \f(CR/usr/bin/env sh <config_file>\fP if the exec\-bit is unset.
.RE
.sp
\fB\-\-verbose\fP, \fB\-V\fP
.RS 4
Output debug information to stdout.
.RE
.sp
\fB\-\-version\fP, \fB\-v\fP
.RS 4
Print version to stdout and exit.
.RE
.sp
\fB\-\-help\fP, \fB\-h\fP
.RS 4
Print options to stdout and exit.
.RE
.SH "DEFINITIONS"
.sp
.if n .RS 4
.nf
.fam C
REGEX\&       := \c
.URL "https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended\-regular\-expression\-syntax.html" "POSIX extended regular expression syntax" ""

LABEL\&       := arbitrary string/text used as an identifier

LAYER\&       := below | normal | above | auto

BOOL_SEL\&    := on | off

FLOAT_SEL\&   := 0 < <value> <= 1.0

RULE_SEL\&    := <index> | LABEL

SIGNAL_SEL\&  := <index> | LABEL

DIR_SEL\&     := north | east | south | west

STACK_SEL\&   := stack.prev | stack.next | stack.first | stack.last | stack.recent | stack.<index (1\-based)>

WINDOW_SEL\&  := prev | next | first | last | recent | mouse | largest | smallest | sibling | first_nephew | second_nephew | uncle | first_cousin | second_cousin | STACK_SEL | DIR_SEL | <window id>

DISPLAY_SEL := prev | next | first | last | recent | mouse | DIR_SEL | <arrangement index (1\-based)> | LABEL

SPACE_SEL\&   := prev | next | first | last | recent | mouse | <mission\-control index (1\-based)> | LABEL

EASING\&      := ease_in_sine\&  | ease_out_sine\&  | ease_in_out_sine\&  |
               ease_in_quad\&  | ease_out_quad\&  | ease_in_out_quad\&  |
               ease_in_cubic | ease_out_cubic | ease_in_out_cubic |
               ease_in_quart | ease_out_quart | ease_in_out_quart |
               ease_in_quint | ease_out_quint | ease_in_out_quint |
               ease_in_expo\&  | ease_out_expo\&  | ease_in_out_expo\&  |
               ease_in_circ\&  | ease_out_circ\&  | ease_in_out_circ
.fam
.fi
.if n .RE
.SH "DOMAINS"
.SS "Config"
.SS "General Syntax"
.sp
yabai \-m config <global setting>
.RS 4
Get or set the value of <global setting>.
.RE
.sp
yabai \-m config [\-\-space \fI<SPACE_SEL>\fP] <space setting>
.RS 4
Get or set the value of <space setting>.
.RE
.SS "Global Settings"
.sp
\fBdebug_output\fP [\fI<BOOL_SEL>\fP]
.RS 4
Enable output of debug information to stdout.
.RE
.sp
\fBexternal_bar\fP [\fI<main|all|off>:<top_padding>:<bottom_padding>\fP]
.RS 4
Specify top and bottom padding for a potential custom bar that you may be running.
.br
\fImain\fP: Apply the given padding only to spaces located on the main display.
.br
\fIall\fP:  Apply the given padding to all spaces regardless of their display.
.br
\fIoff\fP:  Do not apply any special padding.
.RE
.sp
\fBmenubar_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Changes the transparency of the macOS menubar.
.br
If the value is 0.0, the menubar will no longer respond to mouse\-events, effectively hiding the menubar permanently.
.br
The menubar will automatically become fully opaque upon entering a native\-fullscreen space, and adjusted down afterwards.
.RE
.sp
\fBmouse_follows_focus\fP [\fI<BOOL_SEL>\fP]
.RS 4
When focusing a window, put the mouse at its center.
.RE
.sp
\fBfocus_follows_mouse\fP [\fIautofocus|autoraise|off\fP]
.RS 4
Automatically focus the window under the mouse.
.RE
.sp
\fBdisplay_arrangement_order\fP [\fIdefault|vertical|horizontal\fP]
.RS 4
Specify how displays are ordered (determined by center point).
.br
\fIdefault\fP: Native macOS ordering.
.br
\fIvertical\fP: Order by y\-coordinate (followed by x\-coordinate when equal).
.br
\fIhorizontal\fP: Order by x\-coordinate (followed by y\-coordinate when equal).
.RE
.sp
\fBwindow_origin_display\fP [\fIdefault|focused|cursor\fP]
.RS 4
Specify which display a newly created window should be managed in.
.br
\fIdefault\fP: The display in which the window is created (standard macOS behaviour).
.br
\fIfocused\fP: The display that has focus when the window is created.
.br
\fIcursor\fP: The display that currently holds the mouse cursor.
.RE
.sp
\fBwindow_placement\fP [\fIfirst_child|second_child\fP]
.RS 4
Specify whether managed windows should become the first or second leaf\-node.
.RE
.sp
\fBwindow_insertion_point\fP [\fIfocused|first|last\fP]
.RS 4
Specify where new managed windows will be inserted.
.RE
.sp
\fBwindow_zoom_persist\fP [\fI<BOOL_SEL>\fP]
.RS 4
Windows will keep their zoom\-state through layout changes.
.RE
.sp
\fBwindow_shadow\fP [\fI<BOOL_SEL>|float\fP]
.RS 4
Draw shadow for windows.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_opacity\fP [\fI<BOOL_SEL>\fP]
.RS 4
Enable opacity for windows.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_opacity_duration\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Duration of transition between active / normal opacity.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBactive_window_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Opacity of the focused window.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBnormal_window_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Opacity of an unfocused window.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_animation_duration\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Duration of window frame animation.
.br
If 0.0, the change in dimension is not animated.
.br
Requires Screen Recording permissions.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_animation_easing\fP [\fI<EASING>\fP]
.RS 4
Easing function to use for window animations.
.br
See \c
.URL "https://easings.net" "" ""
for details.
.RE
.sp
\fBinsert_feedback_color\fP [\fI0xAARRGGBB\fP]
.RS 4
Color of the \fBwindow \-\-insert\fP message and mouse_drag selection.
.br
The purpose is to provide a visual preview of the new window frame.
.RE
.sp
\fBsplit_ratio\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Specify the size distribution when a window is split.
.RE
.sp
\fBmouse_modifier\fP [\fIcmd|alt|shift|ctrl|fn\fP]
.RS 4
Keyboard modifier used for moving and resizing windows.
.RE
.sp
\fBmouse_action1\fP [\fImove|resize\fP]
.RS 4
Action performed when pressing \fImouse_modifier\fP + \fIbutton1\fP.
.RE
.sp
\fBmouse_action2\fP [\fImove|resize\fP]
.RS 4
Action performed when pressing \fImouse_modifier\fP + \fIbutton2\fP.
.RE
.sp
\fBmouse_drop_action\fP [\fIswap|stack\fP]
.RS 4
Action performed when a bsp\-managed window is dropped in the center of some other bsp\-managed window.
.RE
.SS "Space Settings"
.sp
\fBlayout\fP [\fIbsp|stack|float\fP]
.RS 4
Set the layout of the selected space.
.RE
.sp
\fBsplit_type\fP [\fIvertical|horizontal|auto\fP]
.RS 4
Specify how a window should be split.
.br
\fIvertical\fP: The window is split along the y\-axis.
.br
\fIhorizontal\fP: The window is split along the x\-axis.
.br
\fIauto\fP: The axis is determined based on width/height ratio.
.RE
.sp
\fBtop_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the upper side of the selected space.
.RE
.sp
\fBbottom_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the lower side of the selected space.
.RE
.sp
\fBleft_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the left side of the selected space.
.RE
.sp
\fBright_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the right side of the selected space.
.RE
.sp
\fBwindow_gap\fP [\fI<integer number>\fP]
.RS 4
Size of the gap that separates windows for the selected space.
.RE
.sp
\fBauto_balance\fP [\fI<BOOL_SEL>|x\-axis|y\-axis\fP]
.RS 4
Balance the window tree upon change, so that all windows occupy an equally sized area.
.RE
.SS "Display"
.SS "General Syntax"
.sp
yabai \-m display [\fI<DISPLAY_SEL\fP>] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP \fI<DISPLAY_SEL>\fP
.RS 4
Focus the given display.
.RE
.sp
\fB\-\-space\fP \fI<SPACE_SEL>\fP
.RS 4
The given space will become visible on the selected display, without changing focus.
.br
The given space must belong to the selected display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-label\fP [\fI<LABEL>\fP]
.RS 4
Label the selected display, allowing that label to be used as an alias in commands that take a \f(CRDISPLAY_SEL\fP parameter.
.br
If the command is called without an argument it will try to remove a previously assigned label.
.RE
.SS "Space"
.SS "General Syntax"
.sp
yabai \-m space [\fI<SPACE_SEL>\fP] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP \fI<SPACE_SEL>\fP
.RS 4
Focus the given space.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-switch\fP \fI<SPACE_SEL>\fP
.RS 4
The selected space will always be the currently focused space.
.br
The given space substitutes the selected space, gaining focus.
.br
If the selected space and the given space belong to different displays, this behaves like \fI\-\-swap\fP.
.br
If the selected space and the given space belong to the same display, this behaves like \fI\-\-focus\fP.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-create\fP  [\fI<DISPLAY_SEL>\fP]
.RS 4
Create a new space on the given display.
.br
If none specified, use the display of the active space instead.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-destroy\fP [\fI<SPACE_SEL>\fP]
.RS 4
Remove the given space.
.br
If none specified, use the selected space instead.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-move\fP \fI<SPACE_SEL>\fP
.RS 4
Move position of the selected space to the position of the given space.
.br
The selected space and given space must both belong to the same display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-swap\fP \fI<SPACE_SEL>\fP
.RS 4
Swap the selected space with the given space.
.br
If the selected space and given space belong to different displays, all the windows will swap.
.br
If the selected space and given space belong to the same display, the actual spaces will swap.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-display\fP \fI<DISPLAY_SEL>\fP
.RS 4
Send the selected space to the given display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-equalize\fP [\fIx\-axis|y\-axis\fP]
.RS 4
Reset the split ratios on the selected space to the default value along the given axis.
.br
If no axis is specified, use both.
.RE
.sp
\fB\-\-balance\fP [\fIx\-axis|y\-axis\fP]
.RS 4
Adjust the split ratios on the selected space so that all windows along the given axis occupy the same area.
.br
If no axis is specified, use both.
.RE
.sp
\fB\-\-mirror\fP \fIx\-axis|y\-axis\fP
.RS 4
Flip the tree of the selected space along the given axis.
.RE
.sp
\fB\-\-rotate\fP \fI90|180|270\fP
.RS 4
Rotate the tree of the selected space.
.RE
.sp
\fB\-\-padding\fP \fIabs|rel:<top>:<bottom>:<left>:<right>\fP
.RS 4
Padding added at the sides of the selected space.
.RE
.sp
\fB\-\-gap\fP \fIabs|rel:<gap>\fP
.RS 4
Size of the gap that separates windows on the selected space.
.RE
.sp
\fB\-\-toggle\fP \fIpadding|gap|mission\-control|show\-desktop\fP
.RS 4
Toggle space setting on or off for the selected space.
.RE
.sp
\fB\-\-layout\fP \fIbsp|stack|float\fP
.RS 4
Set the layout of the selected space.
.RE
.sp
\fB\-\-label\fP [\fI<LABEL>\fP]
.RS 4
Label the selected space, allowing that label to be used as an alias in commands that take a \f(CRSPACE_SEL\fP parameter.
.br
If the command is called without an argument it will try to remove a previously assigned label.
.RE
.SS "Window"
.SS "General Syntax"
.sp
yabai \-m window [\fI<WINDOW_SEL>\fP] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Focus the given window.
.br
If none specified, focus the selected window instead.
.RE
.sp
\fB\-\-close\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Close the given window.
.br
If none specified, close the selected window instead.
.br
Only works on windows that provide a close button in its titlebar.
.RE
.sp
\fB\-\-minimize\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Minimize the given window.
.br
If none specified, minimize the selected window instead.
.br
Only works on windows that provide a minimize button in its titlebar.
.RE
.sp
\fB\-\-deminimize\fP \fI<WINDOW_SEL>\fP
.RS 4
Restore the given window if it is minimized.
.br
The window will only get focus if the owning application has focus.
.br
Note that you can also \fI\-\-focus\fP a minimized window to restore it as the focused window.
.RE
.sp
\fB\-\-display\fP \fI<DISPLAY_SEL>\fP
.RS 4
Send the selected window to the given display.
.RE
.sp
\fB\-\-space\fP \fI<SPACE_SEL>\fP
.RS 4
Send the selected window to the given space.
System Integrity Protection must be partially disabled on macOS Monterey 12.7+, Ventura 13.6+, Sonoma 14.5+, and macOS Sequoia.
.RE
.sp
\fB\-\-swap\fP \fI<WINDOW_SEL>\fP
.RS 4
Swap position of the selected window and the given window.
.RE
.sp
\fB\-\-warp\fP \fI<WINDOW_SEL>\fP
.RS 4
Re\-insert the selected window, splitting the given window.
.RE
.sp
\fB\-\-stack\fP \fI<WINDOW_SEL>\fP
.RS 4
Stack the given window on top of the selected window.
.br
Any kind of warp operation performed on a stacked window will unstack it.
.RE
.sp
\fB\-\-insert\fP \fI<DIR_SEL>|stack\fP
.RS 4
Set the splitting mode of the selected window.
.br
If the current splitting mode matches the selected mode, the action will be undone.
.RE
.sp
\fB\-\-grid\fP \fI<rows>:<cols>:<start\-x>:<start\-y>:<width>:<height>\fP
.RS 4
Set the frame of the selected window based on a self\-defined grid.
.RE
.sp
\fB\-\-move\fP \fIabs|rel:<dx>:<dy>\fP
.RS 4
If type is \fIrel\fP the selected window is moved by \fIdx\fP pixels horizontally and \fIdy\fP pixels vertically.
.br
If type is \fIabs\fP \fIdx\fP and \fIdy\fP will become the new position.
.RE
.sp
\fB\-\-resize\fP \fItop|left|bottom|right|top_left|top_right|bottom_right|bottom_left|abs:<dx>:<dy>\fP
.RS 4
Resize the selected window by moving the given handle \fIdx\fP pixels horizontally and \fIdy\fP pixels vertically.
.br
If handle is \fIabs\fP the new size will be \fIdx\fP width and \fIdy\fP height and cannot be used on managed windows.
.RE
.sp
\fB\-\-ratio\fP \fIrel|abs:<dr>\fP
.RS 4
If type is \fIrel\fP the split ratio of the selected window is changed by \fIdr\fP, otherwise \fIdr\fP will become the new split ratio.
.br
A positive/negative delta will increase/decrease the size of the left\-child.
.RE
.sp
\fB\-\-toggle\fP \fIfloat|sticky|pip|shadow|split|zoom\-parent|zoom\-fullscreen|windowed\-fullscreen|native\-fullscreen|expose|<LABEL>\fP
.RS 4
Toggle the given property of the selected window.
.br
The following properties require System Integrity Protection to be partially disabled: sticky, pip, shadow, LABEL (scratchpad identifier) .
.RE
.sp
\fB\-\-sub\-layer\fP \fI<LAYER>\fP
.RS 4
Set the stacking sub\-layer of the selected window.
.br
The window will no longer be eligible for automatic change in sub\-layer when managed/unmanaged.
.br
Specify the value \fIauto\fP to reset back to normal and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-opacity\fP \fI<FLOAT_SEL>\fP
.RS 4
Set the opacity of the selected window.
.br
The window will no longer be eligible for automatic change in opacity upon focus change.
.br
Specify the value \fI0.0\fP to reset back to full opacity and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-raise\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Orders the selected window above the given window, or to the front within its layer.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-lower\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Orders the selected window below the given window, or to the back within its layer.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-scratchpad\fP [\fI<LABEL>|recover\fP]
.RS 4
Unique identifier used to identify a window scratchpad.
.br
An identifier may only be assigned to a single window at any given time.
.br
A scratchpad window will automatically be treated as a (manage=off) floating window.
.br
If the scratchpad is already taken by another window, this assignment will fail.
.br
If the scratchpad is re\-assigned, the previous identifier will become available.
.br
If no value is given, the window will seize to be a scratchpad window.
.br
The special value \fIrecover\fP can be used to forcefully bring all scratchpad windows to the front.
.br
This can be useful if windows become inaccessible due to a restart or crash.
.br
System Integrity Protection must be partially disabled.
.RE
.SS "Query"
.SS "General Syntax"
.sp
yabai \-m query \fI<COMMAND>\fP [\fI<PROPERTIES>\fP] [\fI<ARGUMENT>\fP]
.SS "COMMAND"
.sp
\fB\-\-displays\fP
.RS 4
Retrieve information about displays.
.RE
.sp
\fB\-\-spaces\fP
.RS 4
Retrieve information about spaces.
.RE
.sp
\fB\-\-windows\fP
.RS 4
Retrieve information about windows.
.RE
.SS "ARGUMENT"
.sp
\fB\-\-display\fP [\fI<DISPLAY_SEL>\fP]
.RS 4
Constrain matches to the selected display.
.RE
.sp
\fB\-\-space\fP [\fI<SPACE_SEL>\fP]
.RS 4
Constrain matches to the selected space.
.RE
.sp
\fB\-\-window\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Constrain matches to the selected window.
.RE
.SS "PROPERTIES"
.sp
A comma\-separated string containing the name of fields to include in the output.
.br
The name of the provided fields must be present in the dataformat of the corresponding entity.
.SS "DATAFORMAT"
.sp
DISPLAY
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number
    },
    "spaces": array of number,
    "has\-focus": bool
}
.fam
.fi
.if n .RE
.sp
SPACE
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "type": string,
    "display": number,
    "windows": array of number,
    "first\-window": number,
    "last\-window": number,
    "has\-focus": bool,
    "is\-visible": bool,
    "is\-native\-fullscreen": bool
}
.fam
.fi
.if n .RE
.sp
WINDOW
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "pid": number,
    "app": string,
    "title": string,
    "scratchpad": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number,
    },
    "role": string,
    "subrole": string,
    "root\-window": bool,
    "display": number,
    "space": number,
    "level": number,
    "sub\-level": number,
    "layer": string,
    "sub\-layer": string,
    "opacity": number,
    "split\-type": string,
    "split\-child": string,
    "stack\-index": number,
    "can\-move": bool,
    "can\-resize": bool,
    "has\-focus": bool,
    "has\-shadow": bool,
    "has\-parent\-zoom": bool,
    "has\-fullscreen\-zoom": bool,
    "has\-ax\-reference": bool,
    "is\-native\-fullscreen": bool,
    "is\-visible": bool,
    "is\-minimized": bool,
    "is\-hidden": bool,
    "is\-floating": bool,
    "is\-sticky": bool,
    "is\-grabbed": bool
}
.fam
.fi
.if n .RE
.sp
Some window properties are only accessible when yabai has a valid AX\-reference for that window.
.br
This AX\-reference can only be retrieved when the space that the window is visible on, is active.
.br
If windows are already opened on inactive spaces when yabai is launched, yabai will attempt to detect
.br
these using a workaround, and for most applications and windows this will work. Some windows are not
.br
detected using this method, and for those windows yabai will retrieve a limited amount of information,
.br
until the window that space belongs to becomes active \(em yabai window commands will NOT WORK for these windows.
.br
These windows can be identified by looking at the \f(CRhas\-ax\-reference\fP property. Once the space that the window
.br
belongs to becomes active, yabai will automatically create an AX\-reference. The queries will from that point
.br
forwards contain complete information, and the window  can be used with yabai window commands.
.sp
The properties that contain incorrect information for windows with \f(CRhas\-ax\-reference: false\fP are as follows:
.sp
.if n .RS 4
.nf
.fam C
{
    "role": string,
    "subrole": string,
    "can\-move": bool,
    "can\-resize": bool
}
.fam
.fi
.if n .RE
.SS "Rule"
.sp
All rules that match the given filter will be applied in the order they were registered.
.br
If multiple rules specify a value for the same property, the latter rule will end up overriding that value.
.br
If the display and space properties are both set, the space property will take precedence.
.br
The following properties require System Integrity Protection to be partially disabled: sticky, sub\-layer, opacity, scratchpad.
.SS "General Syntax"
.sp
yabai \-m rule \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-add [\-\-one\-shot] [\fI<ARGUMENT>\fP]\fP
.RS 4
Add a new rule. Rules apply to windows that spawn after said rule has been added.
.br
If \fI\-\-one\-shot\fP is present it will apply once and automatically remove itself.
.RE
.sp
\fB\-\-apply [\fI<RULE_SEL>\fP | \fI<ARGUMENT>\fP]\fP
.RS 4
Apply a rule to currently known windows.
.br
If no argument is given, all existing rules will apply.
.br
If an index or label is given, that particular rule will apply.
.br
Arguments can also be provided directly, just like in the \fB\-\-add\fP command.
.br
Existing \f(CR\-\-one\-shot\fP rules that have yet to apply will be ignored by this command.
.RE
.sp
\fB\-\-remove \fI<RULE_SEL>\fP\fP
.RS 4
Remove an existing rule with the given index or label.
.RE
.sp
\fB\-\-list\fP
.RS 4
Output list of registered rules.
.RE
.SS "ARGUMENT"
.sp
\fBlabel=\fI<LABEL>\fP\fP
.RS 4
Label used to identify the rule with a unique name
.RE
.sp
\fBapp[!]=\fI<REGEX>\fP\fP
.RS 4
Name of application. If \fI!\fP is present, invert the match.
.RE
.sp
\fBtitle[!]=\fI<REGEX>\fP\fP
.RS 4
Title of window. If \fI!\fP is present, invert the match.
.RE
.sp
\fBrole[!]=\fI<REGEX>\fP\fP
.RS 4
.URL "https://developer.apple.com/documentation/applicationservices/carbon_accessibility/roles?language=objc" "Accessibility role of window" "."
If \fI!\fP is present, invert the match.
.RE
.sp
\fBsubrole[!]=\fI<REGEX>\fP\fP
.RS 4
.URL "https://developer.apple.com/documentation/applicationservices/carbon_accessibility/subroles?language=objc" "Accessibility subrole of window" "."
If \fI!\fP is present, invert the match.
.RE
.sp
\fBdisplay=\fI[^]<DISPLAY_SEL>\fP\fP
.RS 4
Send window to display. If \fI^\fP is present, follow focus.
.RE
.sp
\fBspace=\fI[^]<SPACE_SEL>\fP\fP
.RS 4
Send window to space. If \fI^\fP is present, follow focus.
.RE
.sp
\fBmanage=\fI<BOOL_SEL>\fP\fP
.RS 4
Window should be managed (tile vs float).
.br
Most windows will be managed automatically, so this should mainly be used to make a window float.
.RE
.sp
\fBsticky=\fI<BOOL_SEL>\fP\fP
.RS 4
Window appears on all spaces.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBmouse_follows_focus=\fI<BOOL_SEL>\fP\fP
.RS 4
When focusing the window, put the mouse at its center. Overrides the global \fBmouse_follows_focus\fP setting.
.RE
.sp
\fBsub\-layer=\fI<LAYER>\fP\fP
.RS 4
Window is ordered within the given stacking sub\-layer.
.br
The window will no longer be eligible for automatic change in sub\-layer when managed/unmanaged.
.br
Specify the value \fIauto\fP to reset back to normal and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBopacity=\fI<FLOAT_SEL>\fP\fP
.RS 4
Set window opacity.
.br
The window will no longer be eligible for automatic change in opacity upon focus change.
.br
Specify the value \fI0.0\fP to reset back to full opacity and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBnative\-fullscreen=\fI<BOOL_SEL>\fP\fP
.RS 4
Window should enter native macOS fullscreen mode.
.RE
.sp
\fBgrid=\fI<rows>:<cols>:<start\-x>:<start\-y>:<width>:<height>\fP\fP
.RS 4
Set window frame based on a self\-defined grid.
.RE
.sp
\fBscratchpad=\fI<LABEL>\fP\fP
.RS 4
Unique identifier used to identify a window scratchpad.
.br
An identifier may only be assigned to a single window at any given time.
.br
A scratchpad window will automatically be treated as a (manage=off) floating window.
.br
If this rule matches multiple windows, only the first window that matched will be assigned this scratchpad identifier.
.br
System Integrity Protection must be partially disabled.
.RE
.SS "DATAFORMAT"
.sp
.if n .RS 4
.nf
.fam C
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "role": string,
    "subrole": string,
    "display": number,
    "space": number,
    "follow_space": bool,
    "opacity": number,
    "manage": bool (optional),
    "sticky": bool (optional),
    "mouse_follows_focus": bool (optional),
    "sub\-layer": string,
    "native\-fullscreen": bool (optional),
    "grid": string,
    "scratchpad": string,
    "one\-shot": bool,
    "flags": string
}
.fam
.fi
.if n .RE
.SS "Signal"
.sp
A signal is a simple way for the user to react to some event that has been processed.
.br
Arguments are passed through environment variables.
.SS "General Syntax"
.sp
yabai \-m signal \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-add event=\fI<EVENT>\fP action=\fI<ACTION>\fP [label=\fI<LABEL>\fP] [app[!]=\fI<REGEX>\fP] [title[!]=\fI<REGEX>\fP] [active=\fIyes|no\fP]\fP
.RS 4
Add an optionally labelled signal to execute an action after processing an event of the given type.
.br
Some signals can be specified to trigger based on the application name and/or window title, and its active/focused state.
.RE
.sp
\fB\-\-remove \fI<SIGNAL_SEL>\fP\fP
.RS 4
Remove an existing signal with the given index or label.
.RE
.sp
\fB\-\-list\fP
.RS 4
Output list of registered signals.
.RE
.SS "EVENT"
.sp
\fBapplication_launched\fP
.RS 4
Triggered when a new application is launched.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_terminated\fP
.RS 4
Triggered when an application is terminated.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_front_switched\fP
.RS 4
Triggered when the front\-most application changes.
.br
Passes two arguments: $YABAI_PROCESS_ID, $YABAI_RECENT_PROCESS_ID
.RE
.sp
\fBapplication_activated\fP
.RS 4
Triggered when an application is activated.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_deactivated\fP
.RS 4
Triggered when an application is deactivated.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_visible\fP
.RS 4
Triggered when an application is unhidden.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_hidden\fP
.RS 4
Triggered when an application is hidden.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBwindow_created\fP
.RS 4
Triggered when a window is created.
.br
Also applies to windows that are implicitly created at application launch.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_destroyed\fP
.RS 4
Triggered when a window is destroyed.
.br
Also applies to windows that are implicitly destroyed at application exit.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_focused\fP
.RS 4
Triggered when a window becomes the key\-window.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_moved\fP
.RS 4
Triggered when a window changes position.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_resized\fP
.RS 4
Triggered when a window changes dimensions.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_minimized\fP
.RS 4
Triggered when a window has been minimized.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_deminimized\fP
.RS 4
Triggered when a window has been deminimized.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_title_changed\fP
.RS 4
Triggered when a window changes its title.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBspace_created\fP
.RS 4
Triggered when a space is created.
.br
Passes two arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX
.RE
.sp
\fBspace_destroyed\fP
.RS 4
Triggered when a space is destroyed.
.br
Passes one argument: $YABAI_SPACE_ID
.RE
.sp
\fBspace_changed\fP
.RS 4
Triggered when the active space has changed.
.br
Passes four arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX, $YABAI_RECENT_SPACE_ID, $YABAI_RECENT_SPACE_INDEX
.RE
.sp
\fBdisplay_added\fP
.RS 4
Triggered when a new display has been added.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_removed\fP
.RS 4
Triggered when a display has been removed.
.br
Passes one argument: $YABAI_DISPLAY_ID
.RE
.sp
\fBdisplay_moved\fP
.RS 4
Triggered when a change has been made to display arrangement.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_resized\fP
.RS 4
Triggered when a display has changed resolution.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_changed\fP
.RS 4
Triggered when the active display has changed.
.br
Passes four arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX, $YABAI_RECENT_DISPLAY_ID, $YABAI_RECENT_DISPLAY_INDEX
.RE
.sp
\fBmission_control_enter\fP
.RS 4
Triggered when mission\-control activates.
.br
Passes one argument: $YABAI_MISSION_CONTROL_MODE
.RE
.sp
\fBmission_control_exit\fP
.RS 4
Triggered when mission\-control deactivates.
.br
Passes one argument: $YABAI_MISSION_CONTROL_MODE
.RE
.sp
\fBdock_did_change_pref\fP
.RS 4
Triggered when the macOS Dock preferences changes.
.RE
.sp
\fBdock_did_restart\fP
.RS 4
Triggered when Dock.app restarts.
.RE
.sp
\fBmenu_bar_hidden_changed\fP
.RS 4
Triggered when the macOS menubar \fIautohide\fP setting changes.
.RE
.sp
\fBsystem_woke\fP
.RS 4
Triggered when macOS wakes from sleep.
.RE
.SS "ACTION"
.sp
Arbitrary command executed through \fB/usr/bin/env sh \-c\fP
.SS "DATAFORMAT"
.sp
.if n .RS 4
.nf
.fam C
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "active": bool (optional),
    "event": string,
    "action": string
}
.fam
.fi
.if n .RE
.SH "EXIT CODES"
.sp
If \fByabai\fP can\(cqt handle a message, it will return a non\-zero exit code.
.SH "AUTHOR"
.sp
Åsmund Vikane <aasvi93 at gmail.com>